<?php 
	//echo $this->element('menu'); 
	$currentUserInfo = $this->Session->read('Auth');
	$userId = $currentUserInfo['User']['id'];
  debug($image);
?>
<div id="display-image">
	<div class="navbar navbar-fixed-top " role="navigation">
    	<div class="container">
        	<div class="header">
          		<div class="header_left">
              <?php
                if($userId == $image['UserImageBoard']['user_id']){
              ?>
                <a href="/pinterest/Boards/deleteImageInBoard/<?php echo $image['UserImageBoard']['id']; ?>/<?php echo $image['UserImageBoard']['board_id']; ?>">
            			<button type="button" class="btn btn-default ">
                   		<span class="glyphicon glyphicon-pushpin"></span> unPin
            			</button>
                </a>
              <?php
                }else{
              ?>
                <a href="/pinterest/Boards/pinImageIntoBoard/<?php echo $image['UserImageBoard']['id']; ?>/<?php echo $image['UserImageBoard']['board_id']; ?>">
                  <button type="button" class="btn btn-default ">
                      <span class="glyphicon glyphicon-pushpin"></span> Pin
                  </button>
                </a>
              <?php
                  }
              ?>

              <?php
                if($image['UserLike']){
              ?>
                <a href="/pinterest/UserLikes/unlikeImage/<?php echo $image['UserImageBoard']['id']; ?>">
            			<button type="button" class="btn btn-default ">
                    		<span class="glyphicon glyphicon-heart"></span> unLike
            			</button>
                </a>
              <?php
                }else{
              ?>
                <a href="/pinterest/UserLikes/likeImage/<?php echo $image['UserImageBoard']['id']; ?>">
                  <button type="button" class="btn btn-default ">
                        <span class="glyphicon glyphicon-heart"></span> Like
                  </button>
                </a>
              <?php
                }
              ?>
          			<button type="button" class="btn btn-default " onclick="window.location.replace(document.referrer);">
                 		<span class="glyphicon glyphicon-globe"></span> Back web
          			</button> 

          		</div>
	          	<!--<div class="header_right">
		            <button type="button" class="btn btn-default ">
		                <span class="glyphicon glyphicon-send"></span> Gửi
		            </button> 
		            <button type="button" class="btn btn-default ">
		                <span class="glyphicon glyphicon-sort"></span> Chia sẻ
		            </button> 
	          	</div>-->
        	</div>
      	</div>
 	</div>

    <!-- Main jumbotron for a primary marketing message or call to action -->
    <div class="jumbotron">
      <div class="container">
        <div class="col-md-12">
          <div class="display_extensions">
            
            <div class="wrapper_img_display">
              <?php
                echo $this->Html->image($image['Image']['url'],array(
                                      'alt'=>'CakePHP',
                                      'class'=>'img_display_extensions',
                                      'width'=>'100%',
                                      'height'=>'100%'));
              ?>
            </div>          
          </div>
        </div>

        <div class="col-md-12">
          <div class="wrapper_commend">
            <div class="im_commend">
              <div class="left_commend">
                <a href="">
                <?php
                  echo $this->Html->image($image['Profile']['avatar'],array(
                                        'alt'=>'CakePHP',
                                        'class'=>'img_display_extensions',
                                        'width'=>'100%',
                                        'height'=>'100%'));
                ?>
                </a>
              </div>
              <div class="right_commend">
                <div class="user_name">
                  <p><?php echo $image['Profile']['name']; ?></p>
                </div>
                <div class="descriptions_commend">
                  <p><?php echo $image['UserImageBoard']['description']; ?></p>
                </div>
              </div>
            </div>

            <div class="client_commend">
              <div class="left_commend">
                <img src="images/img_1.jpg">
              </div>
              <div class="right_commend">
                <div class="user_name">
                  <p>Hiển thị thông tin khách commend</p>
                </div>
                <div class="information_commend">
                  <textarea></textarea>                  
                </div>
                <div class="buttom">
                  <button class="btn btn-lg btn-danger" type="button">Nhận xét</button>
                </div>
              </div>
            </div>
          </div>
        </div> 

      </div>
    </div>
</div>